package com.qf.service.impl;

import com.qf.mapper.OrderTableMapper;
import com.qf.pojo.OrderTable;
import com.qf.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderTableMapper orderMapper;

    @Override
    public List<OrderTable> findAllOrder() {
        return orderMapper.findAllOrder();
    }

    @Override
    public void deleteById(Integer id) {
        orderMapper.deleteById(id);
    }

    @Override
    public void updateOrder(OrderTable orderTable) {
        orderMapper.updateOrder(orderTable);
    }

    @Override
    public List<OrderTable> findByOrderId(Integer orderId) {
        return orderMapper.findByOrderId(orderId);
    }

    @Override
    public List<OrderTable> findByOrderName(String name) {
        return orderMapper.findByOrderName(name);
    }
}
